package com.jiezheng.huinong.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class CommonUtils {
	public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");
	
	public static String getCurrentDate(){
		return DATE_FORMAT.format(new Date());
	}
	
	/**
	 * 格式化所有的货币格式字串
	 * @param money
	 * @return
	 */
	public static String convertMoneyString(String money) {
		Double moneyDouble = 0.0d;
		if (!money.isEmpty()) {
			moneyDouble = Double.valueOf(money);
		}
		return String.format("%.2f", moneyDouble);
	}
}
